package com.fanben100.gui.i18n;

import java.util.Locale;

import javax.swing.JLabel;

/**
 * 测试
 * 
 * @author Administrator
 * 
 */
public class JPopupPanel extends MultiLanguageJPanel {

	private String titleKey;
	private JLabel titleLabel;

	public JPopupPanel(String titleKey) {
		super(titleKey);
	}

	// 这里用来定义组件
	@Override
	public void iniCurrentComponents(Object... objs) {
		this.titleKey = (String) objs[0];
		// iniComponents();
		// iniLayout();
		// addActions();
	}

	// 所有需要国际化的text,tooltip text等在这里设置
	@Override
	public void updateResource() {
		titleLabel.setText(getResource(titleKey));

	}

	public static void main(String[] args) {
		ResourceContext.getInstance().languageChangedEvent(
				new Locale("zh", "CN"));
	}
}